<?php

class global_vars {

    private static $_vars = array();
    private static $_instance = null;

    public function __construct() {
        
    }

    public static function instance() {
        if (self::$_instance === null) {
            self::$_instance = new global_vars();
        }
        return self::$_instance;
    }

    public static function set($name, $value) {
        self::$_vars[$name] = $value;
    }

    public static function get($name) {
        if(isset(self::$_vars[$name]))
            return self::$_vars[$name];
    }

}
?>
